package com.day2.entity;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author：jojo
 * @Date：2022/1/18 17:59
 * @Description :TODO
 */
public class AutowireTest {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext1.xml");
        Man man = applicationContext.getBean("man", Man.class);
        System.out.println(man);


        ApplicationContext applicationContext1 = new ClassPathXmlApplicationContext("applicationContext2.xml");
        Man man1 = applicationContext1.getBean("man", Man.class);
        System.out.println(man1);
    }
}
